using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using HISModels.Entities;

namespace HISModels.Mapping
{
	public class GoodReturnMap : EntityTypeConfiguration<GoodReturn>
	{
		public GoodReturnMap()
		{
			// Primary Key
			this.HasKey(t => t.Id);

			// Properties
			this.Property(t => t.SupplierCode)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("GoodReturns");
			this.Property(t => t.Id).HasColumnName("Id");
			this.Property(t => t.SupplierCode).HasColumnName("SupplierCode");
			this.Property(t => t.GoodReturnDate).HasColumnName("GoodReturnDate");
			this.Property(t => t.SiteId).HasColumnName("SiteId");
			this.Property(t => t.LocationId).HasColumnName("LocationId");
			this.Property(t => t.ReturnType).HasColumnName("ReturnType");
			this.Property(t => t.Flag).HasColumnName("Flag");
		}
	}
}

